import { ref } from "vue";
import service from "../index.js";

const orderApi = {
    //查询所有的预约
    selectAll(){
        return service.get('/user/order');
    },
    selectByToday(){
        return service.get('/user/order/today');
    },
    //查询某一个预约
    selectById(id){
        return service.get(`/user/order/${id}`)
    },
    // 添加预约
    insert(order){
        return service.post('/user/order',order)
    },
    // 更新预约
    update(order){
        return service.put('/user/order',order)
    },
    // 删除预约
    delete(id){
        return service.delete(`/user/order/${id}`)
    },
}
export default orderApi;